Django Framework / Templates / Master Layout
Master Layout
-
Step
Master Page
my_tennis_club/members/templates/master.html:
{% block title %}{% endblock %} {% block content %} {% endblock %}2. in child page
my_tennis_club/members/templates/all_members.html:
{% extends "master.html" %} {% block title %} My Tennis Club - List of all members {% endblock %} {% block content %} Members
-
{% for x in mymembers %}
- {{ x.firstname }} {{ x.lastname }} {% endfor %}
my_tennis_club/members/templates/details.html:
{% extends "master.html" %} {% block title %} Details about {{ mymember.firstname }} {{ mymember.lastname }} {% endblock %} {% block content %} {{ mymember.firstname }} {{ mymember.lastname }}
Phone {{ mymember.phone }}
Member since: {{ mymember.joined_date }}
Back to Members
{% endblock %}